package com.manager.util.http;

public class HttpParam {
	//http请求头参数设置
	private String contentType;
	private String cacheControl;
	private String encode;
	private boolean keepSessionId;
	private int connectTimeout;
	private int readTimeout;
	
	//其它参数设置
	private String method;
	
	public HttpParam(){
		this.setContentType("application/x-www-form-urlencoded");
		this.setCacheControl("no-cache");
		this.setEncode("UTF-8");
		this.setKeepSessionId(false);
		this.setConnectTimeout(1000 * 10);//10秒
		this.setReadTimeout(1000 * 60 * 10);//10分钟
		
		this.method = "POST";
	}
	
	public boolean isKeepSessionId() {
		return keepSessionId;
	}

	public void setKeepSessionId(boolean keepSessionId) {
		this.keepSessionId = keepSessionId;
	}

	public String getEncode() {
		return encode;
	}

	public void setEncode(String encode) {
		this.encode = encode;
	}

	public String getCacheControl() {
		return cacheControl;
	}
	
	public void setCacheControl(String cacheControl) {
		this.cacheControl = cacheControl;
	}
	
	public String getContentType() {
		return contentType;
	}
	
	public void setContentType(String contentType) {
		this.contentType = contentType;
	}
	
	public String getMethod() {
		return method;
	}
	
	public void setMethod(String method) {
		this.method = method.toUpperCase();
	}

	public int getConnectTimeout() {
		return connectTimeout;
	}

	public void setConnectTimeout(int connectTimeout) {
		this.connectTimeout = connectTimeout;
	}

	public int getReadTimeout() {
		return readTimeout;
	}

	public void setReadTimeout(int readTimeout) {
		this.readTimeout = readTimeout;
	}
	
}
